import * as types from './mutation-types'


export default {
  [types.SAVE_USER_INFOMATION] (state, user) {
    state.username = user
  },
  [types.CLEAR_USERI_NFOMATION] (state) {
    state.username = ''
  },
  [types.SAVE_STEP] (state, step) {
    state.steps = step
  },
  [types.CHANGE_PASS_USE_PHONE] (state, phone) {
    state.phone = phone
  },
  [types.CHANGE_CITY] (state, location) {
    state.locations = location
  },
  [types.CLEAR_CITY_INFO] (state) {
    state.locations = {
      province: '上海',
      city: '上海'
    }
  },
  [types.ONLY_CHANGE_CITY] (state, name) {
    state.locations.city = name
  }
}